eye — Identity matrix


\begin{rail}
Identity : 'eye' '(' ( (Scalar ',' Scalar) \vert Matrix) ')' ;
\end{rail}
eye generates an identity matrix. This is a matrix with each element on the main diagonal set to 1 and all other elements set to 0. If the arguments are two scalars, the first specifies the number of rows and the second specifies the number of columns in the resultant. If the argument is a matrix, then it must have two elements, with the first element specifying the number of rows, and the second element specifying the number of columns in the result. $\Longrightarrow$ This is not an built-in function. This function is normally loaded on start-up from the eye.r file in the standard rlib directory. Use of the -r option, incorrectly setting the RLAB_LIB_DIR environmental variable, or modifying eye.r may make this function unavailable.

Subsections